/*---------------------------------------------------------------------------------

Rotate a bitmap 
---------------------------------------------------------------------------------*/
#include <nds.h>

#include "drunkenlogo.h"

//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
	
	videoSetMode(MODE_5_2D);
	vramSetBankA(VRAM_A_MAIN_BG);

	int bg = bgInit(3, BgType_Bmp16, BgSize_B16_256x256, 0,0);
	dmaCopy(drunkenlogoBitmap, bgGetGfxPtr(bg), drunkenlogoBitmapLen); //Displays/decompresses top image

	bgSetCenter(bg, SCREEN_WIDTH/2, SCREEN_HEIGHT/2);
	bgScroll(bg, SCREEN_WIDTH/2, SCREEN_HEIGHT/2);

	while(1) 
	{
		swiWaitForVBlank();

		bgRotate(bg, 10);

		bgUpdate();
	}

}
